<?php
defined('IN_IA') or exit('Access Denied');
global $_GPC, $_W;
$uniacid = $_W['uniacid'];
$id = $_GPC['id'];
$pid = $_GPC['pid'];
if ($_W['ispost']) {
	$list = pdo_fetchall("SELECT * FROM " . tablename($this->modulename . "_user") . " WHERE uniacid = '{$_W['uniacid']} ' AND pid = '{$pid}' ");
	if (!empty($list)) {
		load()->func('file');
		foreach ($list as $item) {
			$qrfile = IA_ROOT . "/addons/bsht_tbk/qrcode/mposter" . $item['id'] . ".jpg";
			file_delete($qrfile);
		}
		exit(json_encode(1));
	} else {
		exit(json_encode(0));
	}
}